package IO流案例;

import java.io.*;

public class 复制java文件打印流改进版 {
    public static void main(String[] args) throws IOException {
        /*根据数据源创建字符输入流对象*/
        BufferedReader br = new BufferedReader(new FileReader("day10\\复制单级文件夹.java"));
        /*根据字符创建输出流对象*/
        PrintWriter pw = new PrintWriter(new FileWriter("day10\\copy.java"));
        /*读写数据，复制文件*/
        String line;
        while ((line=br.readLine())!=null){
            pw.println(line);
        }
        /*释放资源*/
        pw.close();
        br.close();
    }
}